move settings javascript into module