More cleanup. Added templates and simple UI