added documentaion and code conventions #307