Rewritten large parts of the code
Modified the README to fit the code rewrite