cleaned up and moved old code to somewhere else.