Adding templates for the rectangular case

- Refactoring of the code
- Added the templates for the rectangular case in the config folder
(Note: content.in should be empty)
- Corrected some comments which were not updated