Added interfaces and finished the first implementation.