Removed dead code, And updated for frapsing.