Formatted code, fixed warning from Eclipse, added missing comments/documentation