Various fixes, commented code removed.