Clean up catroid projects

Remove unnecessary casts
Organize imports
Format code
Convert for into for-each loops