cleanup
cleanup and bug fixes