some code cleanup. updated README