organize & fixed few bugs.