Fixes #10 and adds many features