Daniel/bug fixes and clean up

Related to support ticket #366738