Multiple changes:
- split code into regions
- added class, function and property discriptions
- renamed some properties to make it more clear what they're used for
- clean-up unused properties