More cleanup and separation #37