Bug fixes, reformated code, changed readme