Devel

merging a load of stuff from devel branch.