Slowly going transformation to a more stateless code