refactored some per frame object creations