Cleaned up unit::update() a little

Also changed .bat files for codeblocks
Merge pull request #123 from Twizzes/Unit.cpp_Cleanup

Cleaned up unit::update() a little