Some updated configuration and slight refactoring