restructure to simplify tests and code
add post file and get file functionality