little javascript snippets and components