fixed some indentation, moved some configuration to top of file