Added InvalidAlgorithmError class, and reorganised to follow psr-4 layout