restructure scripts so that global are splited into user side and application/library side