Added more POD and reorganised code