Added interfaces and some other tweaks.