Minor engine changes

* Added more comments to code
* Added preprocessor variables