Refactors and fixes preset bug