Added logging interface and cleaning up features