refactor bin, add template remove command, closes #172