Added castle methods and tests