diff --git a/athenasub/include/athenasub/athenastring.h b/athenasub/include/athenasub/athenastring.h
index abd2ebf05c5216d7cada50ba437d2444d9492329..444a0938af2ca06f446a8c7decd93ef847add38b 100644
--- a/athenasub/include/athenasub/athenastring.h
+++ b/athenasub/include/athenasub/athenastring.h
@@ -55,8 +55,8 @@ namespace Athenasub {
 		String(const char* utf8);
 		String(const char* utf8,size_t bytes);
 		String(const basic_string<Character>& str);
-		String(const wchar_t* utf16);
-		String(const wxString& wxstring);
+		explicit String(const wchar_t* utf16);
+		explicit String(const wxString& wxstring);
 
 		wxString GetWxString() const;
 
diff --git a/athenasub/src/athenastring.cpp b/athenasub/src/athenastring.cpp
index a8ca566e93f85cc447414303483fbd143fe60536..cadd467ee0c4de7c73700b3b44b194226a8895e9 100644
--- a/athenasub/src/athenastring.cpp
+++ b/athenasub/src/athenastring.cpp
@@ -139,7 +139,7 @@ String& String::Trim(bool fromRight)
 		n = len - start;
 	}
 
-	*this = substr(start,n);
+	*this = String(substr(start,n));
 	return *this;
 }
 
@@ -176,27 +176,27 @@ size_t String::Find(Character c) const
 
 String String::Left(size_t n) const
 {
-	return substr(0,n);
+	return String(substr(0,n));
 }
 
 
 String String::Right(size_t n) const
 {
 	size_t len = size();
-	return substr(len-n,n);
+	return String(substr(len-n,n));
 }
 
 
 String String::Mid(size_t start,size_t count) const
 {
-	return substr(start,count);
+	return String(substr(start,count));
 }
 
 
 bool String::StartsWith(const String& string,bool caseSensitive) const
 {
 	if (caseSensitive) {
-		String tmp = substr(0,string.size());
+		String tmp = String(substr(0,string.size()));
 		return compare(0,string.size(),string) == 0;
 	} else {
 		return AsciiLower().StartsWith(string.AsciiLower(),true);
@@ -514,12 +514,12 @@ String String::PrettyFloat(String src)
 // Float to string
 String String::FloatToString(float src)
 {
-	return PrettyFloat(wxString::Format(_T("%f"),src));
+	return PrettyFloat(String(wxString::Format(_T("%f"),src)));
 }
 
 String String::FloatToString(double src)
 {
-	return PrettyFloat(wxString::Format(_T("%f"),src));
+	return PrettyFloat(String(wxString::Format(_T("%f"),src)));
 }
 
 
@@ -527,7 +527,7 @@ String String::FloatToString(double src)
 // Int to string
 String String::IntegerToString(int value)
 {
-	return wxString::Format(_T("%i"),value);
+	return String(wxString::Format(_T("%i"),value));
 }
 
 
diff --git a/athenasub/src/text_file_reader.cpp b/athenasub/src/text_file_reader.cpp
index 93c7836ca8e971543e56c7692f151ef9abfdc853..f5fb59bedfb8c4176b39262b7181742ad798fd3a 100644
--- a/athenasub/src/text_file_reader.cpp
+++ b/athenasub/src/text_file_reader.cpp
@@ -116,14 +116,14 @@ String GetString(char *read,shared_ptr<wxMBConv> conv,bool isUtf8)
 	if (isUtf8) {
 		return String(read);
 	} else {
-		return wxString(read,*conv);
+		return String(wxString(read,*conv));
 	}
 }
 String GetString(wchar_t *read,shared_ptr<wxMBConv> conv,bool isUtf8)
 {
 	(void)conv;
 	(void)isUtf8;
-	return wxString(read);
+	return String(read);
 }
 inline void Swap(wchar_t &a) {
 	char *c = (char*) &a;
@@ -204,9 +204,14 @@ Athenasub::String TextFileReader::ActuallyReadLine()
 	// Read ASCII/UTF-8 line from file
 	else ParseLine<char>(buffer1,file,stringBuffer,conv,false,isUtf8);
 
-	// Remove BOM
+	// Remove BOM (UTF-8 EF BB BF)
 	size_t startPos = 0;
-	if (stringBuffer.Length() > 0 && stringBuffer[0] == 0xFEFF) startPos = 3;
+	if (stringBuffer.Length() >= 3) {
+		int b1 = (unsigned char) stringBuffer[0];
+		int b2 = (unsigned char) stringBuffer[1];
+		int b3 = (unsigned char) stringBuffer[2];
+		if (b1 == 0xEF && b2 == 0xBB && b3 == 0xBF) startPos = 3;
+	}
 
 	// Trim
 	String str = String(stringBuffer);
@@ -243,7 +248,7 @@ void TextFileReader::EnsureValid(Athenasub::String enc)
 // Get encoding being used
 String TextFileReader::GetCurrentEncoding()
 {
-	return encoding.c_str();
+	return String(encoding.c_str());
 }
 
 
diff --git a/athenasub/src/text_file_reader.h b/athenasub/src/text_file_reader.h
index 478509877dde3d073363cb5f36b10a047c961475..2e959ef15bc7eb9f33be1c3bc2eebb215437dece 100644
--- a/athenasub/src/text_file_reader.h
+++ b/athenasub/src/text_file_reader.h
@@ -69,7 +69,7 @@ namespace Athenasub {
 		String ActuallyReadLine();
 
 	public:
-		TextFileReader(wxInputStream &stream,String encoding=_T(""),bool trim=true,bool prefetch=true);
+		TextFileReader(wxInputStream &stream,String encoding="",bool trim=true,bool prefetch=true);
 		~TextFileReader();
 
 		String ReadLineFromFile();
diff --git a/athenasub/src/text_file_writer.h b/athenasub/src/text_file_writer.h
index 52a0905ba48baaf6c63fbda0a03c629c75fda419..45606f644d177cbf0bdf8ed97343366306849fcf 100644
--- a/athenasub/src/text_file_writer.h
+++ b/athenasub/src/text_file_writer.h
@@ -55,7 +55,7 @@ namespace Athenasub {
 		void SetEncoding(String encoding);
 
 	public:
-		TextFileWriter(wxOutputStream &stream,String encoding=_T(""));
+		TextFileWriter(wxOutputStream &stream,String encoding="");
 		~TextFileWriter();
 
 		void WriteLineToFile(Athenasub::String line,bool addLineBreak=true);
diff --git a/athenasub/test/src/main.cpp b/athenasub/test/src/main.cpp
index 3c5657e82f6d83adb8177ef963074703818f89d5..77499f5296148bcebaf18c67b679075eb3fdef1b 100644
--- a/athenasub/test/src/main.cpp
+++ b/athenasub/test/src/main.cpp
@@ -99,7 +99,7 @@ int main()
 		cout << "Executing action " << n << " times... ";
 		timer.Start();
 		for (int i=0;i<n;i++) {
-			ActionList actions = control->CreateActionList(L"Test");
+			ActionList actions = control->CreateActionList("Test");
 			Selection selection = control->CreateSelection();
 			selection->AddRange(Range(0,5000));
 			selection->AddRange(Range(4500,5500));
diff --git a/athenasub/test/src/text_file_reader.h b/athenasub/test/src/text_file_reader.h
index cf11f515e58228a93aa8b4f2cf830b99a7b7e4a6..768aa90750d6813e32337eb8c855ea67575a0fc0 100644
--- a/athenasub/test/src/text_file_reader.h
+++ b/athenasub/test/src/text_file_reader.h
@@ -72,7 +72,7 @@ private:
 	void SetEncodingConfiguration();
 
 public:
-	TextFileReader(Athenasub::String filename,Athenasub::String encoding=_T(""),bool trim=true);
+	TextFileReader(Athenasub::String filename,Athenasub::String encoding="",bool trim=true);
 	~TextFileReader();
 
 	Athenasub::String ReadLineFromFile();
diff --git a/athenasub/test/src/text_file_writer.h b/athenasub/test/src/text_file_writer.h
index 190efd1614bc6a03efb94a68ef4ea3365330b02d..54bc215ceed13238542f249b07e2d86266e02ce3 100644
--- a/athenasub/test/src/text_file_writer.h
+++ b/athenasub/test/src/text_file_writer.h
@@ -65,7 +65,7 @@ private:
 	void SetEncoding();
 
 public:
-	TextFileWriter(Athenasub::String filename,Athenasub::String encoding=_T(""));
+	TextFileWriter(Athenasub::String filename,Athenasub::String encoding="");
 	~TextFileWriter();
 
 	void WriteLineToFile(Athenasub::String line,bool addLineBreak=true);
diff --git a/unit_test/src/athenasub/test_file.cpp b/unit_test/src/athenasub/test_file.cpp
index f300ebabe9481fa693bb26fa978bb6062739a383..0b6437604f2d58b77f7b58390b6d3bc5094ae5d5 100644
--- a/unit_test/src/athenasub/test_file.cpp
+++ b/unit_test/src/athenasub/test_file.cpp
@@ -54,22 +54,30 @@ class AthenasubFileTest : public CppUnit::TestFixture {
 private:
 	LibAthenaSub lib;
 	String fileFolder;
+	Model subs;
+	Controller controller;
 
 public:
-	void setUp()
+	AthenasubFileTest()
 	{
 		fileFolder = "test_files/";
 		lib = Athenasub::Create("AthenasubTest");
 	}
 
+	void setUp()
+	{
+		subs = lib->CreateModel();
+		controller = subs->CreateController();
+	}
+
 	void tearDown()
 	{
+		subs = Model();
+		controller = Controller();
 	}
 
 	void testLoad()
 	{
-		Model subs = lib->CreateModel();
-		Controller controller = subs->CreateController();
 		CPPUNIT_ASSERT_NO_THROW(controller->LoadFile(fileFolder+"in_test1.ass","UTF-8"));
 		ConstModel csubs = subs;
 		CPPUNIT_ASSERT(csubs->GetSectionCount() == 3);
@@ -81,17 +89,14 @@ public:
 
 	void testSave()
 	{
-		Model subs = lib->CreateModel();
-		Controller controller = subs->CreateController();
-		controller->LoadFile(fileFolder+"in_test1.ass","UTF-8");
+		CPPUNIT_ASSERT_NO_THROW(controller->LoadFile(fileFolder+"in_test1.ass","UTF-8"));
 		CPPUNIT_ASSERT_NO_THROW(controller->SaveFile(fileFolder+"out_test1.ass","UTF-8"));
 	}
 
 	void testStableRewrite()
 	{
-		Model subs = lib->CreateModel();
-		Controller controller = subs->CreateController();
-		controller->LoadFile(fileFolder+"out_test1.ass","UTF-8");
+		CPPUNIT_ASSERT_NO_THROW(controller->LoadFile(fileFolder+"out_test1.ass","UTF-8"));
+		CPPUNIT_ASSERT(subs->GetSectionCount() == 3);
 		CPPUNIT_ASSERT_NO_THROW(controller->SaveFile(fileFolder+"out_test2.ass","UTF-8"));
 		CPPUNIT_ASSERT(AreFilesIdentical(fileFolder+"out_test1.ass",fileFolder+"out_test2.ass"));
 		CPPUNIT_ASSERT(AreFilesIdentical(fileFolder+"in_test1.ass",fileFolder+"out_test1.ass") == false);
diff --git a/unit_test/src/athenasub/test_format_ass.cpp b/unit_test/src/athenasub/test_format_ass.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6dc1f70ce3fefe39e2ba563c8855d9e5229719b0
--- /dev/null
+++ b/unit_test/src/athenasub/test_format_ass.cpp
@@ -0,0 +1,74 @@
+// Copyright (c) 2008, Rodrigo Braz Monteiro
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//   * Redistributions of source code must retain the above copyright notice,
+//     this list of conditions and the following disclaimer.
+//   * Redistributions in binary form must reproduce the above copyright notice,
+//     this list of conditions and the following disclaimer in the documentation
+//     and/or other materials provided with the distribution.
+//   * Neither the name of the Aegisub Group nor the names of its contributors
+//     may be used to endorse or promote products derived from this software
+//     without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// -----------------------------------------------------------------------------
+//
+// AEGISUB
+//
+// Website: http://aegisub.cellosoft.com
+// Contact: mailto:zeratul@cellosoft.com
+//
+
+#include "../suites.h"
+#include "../utils.h"
+#if ATHENASUB_TEST == 1
+
+#include <iostream>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include "athenasub/athenasub.h"
+#include "formats/format_ass.h"
+using namespace Athenasub;
+
+
+class AthenasubFormatASSTest : public CppUnit::TestFixture {
+	CPPUNIT_TEST_SUITE(AthenasubFormatASSTest);
+	CPPUNIT_TEST(testDialogueParse);
+	CPPUNIT_TEST_SUITE_END();
+
+private:
+
+public:
+	void setUp()
+	{
+	}
+
+	void tearDown()
+	{
+	}
+
+	void testDialogueParse()
+	{
+		DialogueASS diag;
+		DialogueASS refDiag;
+		CPPUNIT_ASSERT_NO_THROW(refDiag = DialogueASS("Dialogue: 3,1:23:45.67,2:34:56.78,style name,actor name,0001,0020,3300,effect field,Text, why halo thar?",1));
+	}
+};
+
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(AthenasubFormatASSTest,AegisubSuites::athenasub());
+
+#endif
diff --git a/unit_test/src/main.cpp b/unit_test/src/main.cpp
index f14249d407e80b7d3b1a08793a7d2d052c3c6d8b..45b422d477498f8734bd63ad1d73b1ea35a1f10e 100644
--- a/unit_test/src/main.cpp
+++ b/unit_test/src/main.cpp
@@ -48,9 +48,6 @@
 #endif
 
 
-bool visual_studio_open_file(char const * filename, unsigned int line);
-
-
 int main()
 {
 	CppUnit::TextUi::TestRunner runner;
@@ -60,7 +57,6 @@ int main()
 #endif
 	runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
 
-	visual_studio_open_file("e:\\Projects\\aegisub\\unit_test\\src\\main.cpp",63);
 	bool result = runner.run("",false);
 	return result ? 0 : 1;
 }
diff --git a/unit_test/unit_test.vcproj b/unit_test/unit_test.vcproj
index e6b124d7240c02adfafc3eb96cddca03761e16fd..5a7257d886597f9a8b211d9e47476e470c6d0198 100644
--- a/unit_test/unit_test.vcproj
+++ b/unit_test/unit_test.vcproj
@@ -41,6 +41,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
+				AdditionalIncludeDirectories="../athenasub/include;../athenasub/include/athenasub;../athenasub/src"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -114,6 +115,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="../athenasub/include;../athenasub/include/athenasub;../athenasub/src"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -184,6 +186,10 @@
 				RelativePath=".\src\athenasub\test_file.cpp"
 				>
 			</File>
+			<File
+				RelativePath=".\src\athenasub\test_format_ass.cpp"
+				>
+			</File>
 			<File
 				RelativePath=".\src\athenasub\test_string.cpp"
 				>
@@ -212,10 +218,6 @@
 				RelativePath=".\src\utils.h"
 				>
 			</File>
-			<File
-				RelativePath=".\src\vc_open_test.cpp"
-				>
-			</File>
 		</Filter>
 	</Files>
 	<Globals>