Question 1: At this time I'd recommend putting the code in a JS Resource - see http://docs.sencha.com/architect/2/#!/guide/resources-section-3

Ideally Architect would let you extend the base theme...