add composer.lock and improve code quality