First check in of total revamped code