Added more comments (and docs :P); fixed bug in @param validation