Reordered everthing, small fixes