Added features / Debugging

Fixed some bugs and added features. Then debugged that features.