[TASK] Refactor code and improve tests