[WIP] Multiple changes related to disposal. Also some formatting :-/