Refactoring step definitions and main layout