Fix wrong placements of functions, and adding of username span