Tweaked for modularity