Made protocol declarations optional and built in closure functionality for convenience.