Separate script assets into more reusable parts