Fixed a bunch of feature requests and bug fixes