split out pillarModel.js

bugfix for application.py
split pillarModel into two additional models
changed some publicly scoped methods to be private where it made sense
renamed some things