Tested, removed some bugs. Ready for pulling.