Sorted out most of the stuff.