Fixed small bugs. made it available for import.