Changing program structure, removing static class "staticobjects"