Part 2: Restructure project and introduce templates