Removed inline compilation of templates + cleanup