Cleaned up unit::update() a little

Also changed .bat files for codeblocks