Pulled changes from SirCmpwn

Will work on reapplying my changes now.
Reapplied bugfixes and added new ones