Moved some stuff around, made model and view friends with main class.