Added memory check.
Internal restructure to get more functionality into base class.
Added cpu activity check.