#2 fixed custom table prefix

refactored the javascript of the CMP