Added dir, dot and rotate methods

Also changed formatting