Moved #top, fixing bugs