JS modularization pattern, initial validation module