Cleaned up code smells