Fixed some bugs; tested, everything seems to work