Added timing test
Bug fixes and junk