cleaned stuff up to make this smaller.