Pending improvements and refactoring