[#19] Added spec and some javadoc