Cleaned up code to become start for Master branch