Trimming down uneccessary code