Lot's of changes, removed some now redundant stuff