Merge of marcusmansson, asampe and mynarios work