reorganize libraries
move flash and restrict to lib