Working code. Initial commit