Fixed several bugs. Usable now.