Cleanups

Small set of cleanups: 
* Moved more methods to private class
* A small bugfix when having an empty model that causes crashes