Cleaning up main and compiler warnings