Updated readme, cleaned up code