Added a lot of functionality, finally making progress.