cleaned up some code and fixed some warnings