Reformatted code and extended readme file