BETA release: some code optimization