Started refactor x80sv code