Huge refactor

Separated treatment of POSCAR inputs from automatic distortions
Changed algorithm to calculate borneffchg