Continued bug fixing and small improvements.