Fixed a few errors found in testing. Now it's usable!