Revamped new piece JS, using validation box generic funcionality