Improve code internals