clean code, use double quotes
refactor, remove unused event
clean code, simplify id settings
refactor, use local var
refactor, put draw login in template