First version, extracted from game repo