checking in with extensive changes, cleanup needed.