Changed program structure, added sortimplementation class