Refactor/apache