Rearraring and bug fixes, see wiki for instructions