Add local settings, update requirements and refactor a little bit