Added SpongyCastle library, many changes throughout the implementation