Fixed the way buttons merged html attributes

Started to add documentation.