Add some documentation to code, methodized side detection