metro7: refactor and cleanup