Added a lot of stuff - more of a framework now.