Made huge changes, works 100% now

Cleaned up the code immensley!