MAJOR rewrite of background and model