added reordering
added spec tests for main
added localstorageservice