moved stuff around, fixed some bugs