better event handlers
move compile.js to core folder and add helper js file.
take title and content to compile