Replaced skysub function with modularized code, along with any necessary functions it calls, removed old skysub code