This is mostly functional but needs a couple fixes