split scriptapi.cpp

Remerge some files in order to reduce number of additional files

Make necessary changes for split, rename files, reorganize some bits