Clean up lib imports, compile everything in MD