we need to refactor much of the code to be in smaller chunks (functions, preferably) that can be properly tested with pytest. that'd make everyone more comfortable when we change pyprep behavior, like suggested in #19