Restructure application for plugin usage