Initial modularization of code. This breaks the viewer.