fixed some instances of bad coding style