code fixes, code restructure, readme changes