Cleaned up code, fixed console bugs.

Change-Id: I32e08bf363468d5133405025d4a11386c9b4b519