Cleanup
Bug fixes and cleaning