Replace with (Issue #53) and other fixes