Added pragma once
Added throw after functions' heads
Some corrections in tests