Epic refactoring - the beginning.
More refactoring.
Several bugfixes.
Update now works correctly.
More improvements.
Merge pull request #5 from impworks/refactor

Epic refactoring