Added permission and search code and layouts.
Added external libs.