Some re-factors and global cleanUp