Refactoring of init, added some niceities like C-return, M-return