cleanup and removed compiler warnings