Refactor boxCollides

Made collision logic more understandable
Merge pull request #49 from MrMagnus/refactor-boxCollides

Refactor boxCollides