Fixed constructor missing error - code re-arranged - repl side effect