cleaning up code and settings options