Fixed up some code in file.
fixed package structure and fixed a lot of errors in test file