Added global vectors in main, worked on debugging functions

Still need to debug a lottttt, also need sort and rearrange functions.