Added secure module and 1rst version of model layer