All bugs fixed, but need to refactor