Cleanup
Fixing logic
Rookie mistake
Merged from master