Added a bunch of features, that didn't get into seperate commits. Sorry.