Move error raising responsibility and increase readability in SLG calc