Refactor and add ramps