Fixing pep8 issues
Separating util functions and main
Pulling memos into shift_dir