Refactor code, add a setup script, add documentation
Just some small fixes.