Added methods and restructured code

I FORGOT TO COMMIT IM A SILLY BOY