Added templates
Added new option
Added additional option, cleaned up code