Improve code style for method definitions