Moved things for better visibility. Extended Base and Main Classes.