Moved main functionality into LifeCycle class.