Code cleanup

Cleaned up some warnings highlighted by Intellij Idea