moved api code to a separate directory. created readme.