Edited platform code

Made the code in the platform classes more efficient