only $compile element when there is an element
add onComplete callback more reliably
Updates build files