Added an input manager to separate session class from input. Other minor changes.