Restructed code. Split the controllers into multiple fragments. Still a bit of cleaning up to do.