Added Message model and all pages logic