Separate variable declaration from initialization

Makes VS2010 cry
Fixed test on Windows
Fixed test
Use assertEqual on tests instead of assertEquals