organized template code, updated input component