cleaned up some warnings/messy code