remove horizontal/vertical support
initial commit of the c port. it compiles but doesn't work