Issue #18 - Refactor types and interfaces