added some doc blocks, some refactoring, added support of alternate syntax for views