separate core from server part 1
update licence info
extract api, add common Format, Mediatype