Refactor done, some minor modifications to outputs