Changed Frames system and fixed some bugs.