Working commit

Fully working now. There are still some features to add, but it is
functional at the moment.