Moved setApplication call and moved it to the Framework application layer.