Added more features

A lot more code was added. Tested it; everything appears to work well.
Will release if no further bugs are found.