Build 4.x

pulling out methods to clean up the code + started working on custom
exception handling