Updating readme, cleaning up code a bit