Add some structures, update fields and funcions