Initial commit with khyperia's code