cleaned up code and small bugs. Able to delete now.