Refactored form and window initialization and fixed fill property