added a bunch of comments, fixed some formatting, improved validation of request parameters
Merge branch 'master' of github.com:concrete5/concrete5