cleaned up julia 0.4 warnings
restored 0.3 compatability