Started splitting up some functionality.