Added a heap of features. Some bugs are still present