Some minor code cleanups

This branch contains some minor code cleanups, e.g. unused imports, unnecessary throws declarations, missing @Overrides and so on.