Cleanup, fixed some warnings