Beginning to break script down into managable parts.