Restructuring to work with composer