ECO-misc-37a9.13: Changed calculations of effective laboratory levels. Also some bugfixes