Optimize __init__ method.