Refactored and added Dockerfile and some basic tests.