Cleaned up ribbon code