Replaced makesky function with modularized code, along with any necessary gunctions it calls, removed olf makesky code