Moved most ops into functions, still messy/incomplete
Now working, fixed grep typo
Complete func transition, cleanup, update readme
Bump version