First pass through of code

Still need to fully test the new pass though. Selection op still needs
to be updated