Clean up and warnings added