Refactor 'create' command into separate file