Updating class and adding much more functionality.