add main and compilation to core