General cleanup, basic functionality done