Cleaned up code a bit and fixed README