Cleaned up the header to use some base classes