Merge pull request #6 from bendiy/master

Fix performance on unit load.
Code style fixes
Adding unit to variables for further usage
Entity preprocess optimized
Use cached list function for units