Warning fixes; was too tired to write javadoc however