Restructure a bit and add checks for doubled '//'