Refactor architecture and add new use cases