Merged @ruezel's latest code changes into the forked branch of thulya.