Surface modification of inorganic layer compound with organic compound and preparation of thin films