Improved the DocBlocks and other code cleanup

Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks