JS cleanup + Step validation logic