corrected documentation, extracted functionality used in few hooks