Fixed redundant and improper externs

+ Fixed includes