Fixed some compiler warnings, cleaning up