Added comments and properties/functions access modifiers.
Slightly fixed code formatting.