Removed old files
Fixed some code. Added unit tests