split functionality across files; updated readme