Added README and fixed some small bugs