Some minor changes.

doit/1 and doit/3 now return {ok, Pid}|Error enstead of ok|Error.
Add {error, ghost_not_started} return value to doit functions for case when ghost application is not started.