Cleaned up my code, fixing most of the warnings and lint suggestions.