Wrote getFrame() and removed most bugs