Updated project to run in visual studio 2012. Also fixed project configs for debug mode.
Added comment for my own clarification.
Implemented cube intersect function.

Added some utility macros for min,max, and swap.