#1, #2, #3, #4

Commit for issue 1, 2, 3, 4.
Issue 1 & 2 finished with this commit. 3 & 4 still pending.