Some code cleanup and udpated readme