Code update

Updated functions so they are enclosed in a class to help prevent
naming conflicts