Fleshed out the intent concept a bit more and added some tests