restructure everything and prepare for web-version